#pragma once

#include "VirtualButton/VirtualButton.h"
#include "auto/auto.h"
#include "filter/filter.h"
#include "globals/globals.h"
#include "handles/handles.h"
#include "pid/pid.h"
#include "screen/screen.h"
#include "vex.h"

extern bool screen_ready;
void auto_thread_routine();
void controller_print_team_number_and_autoinfo();
void run_auto_background();
void special_key_handle();

class Clock {
  long t0 = timer::system();
public:
  unsigned int get_msec_timing() { return (timer::system() - t0); }
  unsigned int get_sec_timing() { return get_msec_timing() /1000; }
  unsigned int get_sec_disp() { return get_sec_timing() % 60; }
  unsigned int get_min_disp() { return get_sec_timing() / 60 % 60; }
  unsigned int get_hour_disp() { return (get_sec_timing() / 3600 % 60) % 24; }
  void reset() { t0 = timer::system(); }
};

extern bool competition_on;
extern void ctrl_clock_disp_reset();
extern void ctrl_rumble_remind_reset();
///////////////////////////////////////////////////////////////////////////////////////////////
